/*
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright (c) 2013-2014 sagyf Yang. The Four Group.
 */

package com.ifonly.ext.shiro.role;

import org.apache.shiro.subject.Subject;

/**
 * @author <a href="mailto:ifonlymaster@163.com">ifonly</a>
 * @version 1.0 2015-12-16 16:07
 * @since JDK 1.6
 */
public class LacksRoleTag extends RoleTag {
    @Override
    protected boolean showTagBody(String roleName) {
        final Subject subject = getSubject();
        return !(subject != null && subject.hasRole(roleName));
    }
}
